<table class="layui-table text-center" lay-size="sm">
    <thead>
        <tr>
            <th><input type="checkbox" class="checked-all" target="purchase-id"></th>
            <th><div class="text-left">供应商</div></th>
            <th><div class="text-left">采购员</div></th>
            <th><div class="text-left">采购单号</div></th>
            <th>SKU</th>
            <th>收货仓库</th>
            <th>收货时间</th>
            <th>收货人</th>
            <th>异常类型</th>
            <th>处理人</th>
            <th>处理结果</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {volist name="list" id="item"}
            <tr>
                <td><input type="checkbox" class="purchase-id" name="purchase_id[]" value="{$item.purchase_id}"></td>
                <td class="text-left">{$item.producer_name}</td>
                <td class="text-left">{$item.buyer.nickname}</td>
                <td class="text-left copy-text">{$item.purchase_sn}</td>
                <td class="copy-text">{$item.sku}</td>
                <td>{$item.warehouse.name}</td>
                <td>{$item.recv_date}</td>
                <td>{$item.recv?$item.recv.nickname:''}</td>
                <td>{$exception_type[$item.exception_type]}</td>
                <td>{php}echo \app\common\model\Admin::getNicknameById($item['user_id']);{/php}</td>
                <td>{$dispose_result[$item.dispose_result]}</td>
                <td class="text-left">{$item.remark}</td>
                <td>
                    {if $item->getData('dispose_result') == $dispose_wait}
                    <a class="layui-btn layui-btn-xs layui-btn-normal ajax-form" width-form="80%" height-form="80%"  title="处理采购异常" href="{:url('info', ['purchase_id' => $item['purchase_id']])}">处理</a>
                    {/if}
                </td>
            </tr>
        {/volist}
        {empty name="list"}
        <tr>
            <td colspan="13">没有数据</td>
        </tr>
        {/empty}
    </tbody>
</table>
<div class="page">
    {$page|raw}
</div>